package com.myBlast.client.services;

import java.util.List;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.myBlast.data.BlastResult;

/**
 * This is the service interface of the myBlast app
 * @author Parit Bansal
 */
@RemoteServiceRelativePath("blastService")
public interface MyBlastServiceInterface extends RemoteService {
	/**
	 * This method returns the list of BlastResult object.
	 * @param str A delimited string containing the form values
	 * and taxids of the organisms selected.
	 * @return A list of BlastResult objects.
	 */
	public List<BlastResult> getResults(String str);
	
	/**
	 * This method returns the content of the file provided 
	 * by the input parameter. 
	 * @param input A delimited string containing the project folder name
	 * and file name (without extension).
	 * @return The contents of the file requested.
	 */
	public String getData(String input);
	
	/**
	 * This method saves the list BlastResults as a CSV file on the
	 * server. Typically this method is used in conjuction with calling
	 * doGet method of the servlet which allows you to download 
	 * the file saved by this method. 
	 * @param rslts A list of BlastResult objects.
	 * @return The name of the file along with the extension.
	 */
//	public String getCSV(List<BlastResult> rslts);
	
	public String getFile(List<BlastResult> rslts);
	/**
	 * @param rslts
	 * @return
	 */
	public String saveProject(List<BlastResult> rslts);
	
	public boolean stopRunning(String projectFolder);
	
} // MyBlastServiceInterface
